package com.example.controller;

import com.example.entity.Result;
import com.example.service.TeacherService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/teacher")
public class TeacherController {

    @Autowired
    private TeacherService teacherService;

    /**
     * 添加教师
     *
     * @return
     */
    @PostMapping("/addTeacher")
    public Result addTeacher() {
        // TODO: 添加教师
        String result = teacherService.saveTeacher();
        return Result.success("addTeacher success", result);
    }

}
